package com.wwlwxg.spring_security.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@Slf4j
@ControllerAdvice
public class GlobalExceptionHandler {

  @ExceptionHandler({ArithmeticException.class, NullPointerException.class})
  public String handleArithException(Exception e) {
    log.error("sss", e);

    return "login";
  }
}
